<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>操作员查询</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

	<link href="<s:url value="/css/common.css"/>" type="text/css"

	rel="stylesheet" />
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript" src="/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/js/tabcontrol/TabPanel.js"></script>

<script type="text/javascript">

	$(document).ready(
			function() {
			
			$("#btnAdd").click(
			function(){
			
			 $("#queryForm").attr("action","${rootPath}/model/addModel.ct");
		     return true;  	
					
			});
			
			$("#btnModif").click(
			function(){
			var len=$(":checkbox[name=multi_sel]:checked").length;
			if(len==1){
				$("#queryForm").attr("action","${rootPath}/model/modifModel.ct");
				return true;
			}else{
				alert('请选择一个需要重置的用户！');
				return false;
			}
			});
			$("#btnDel").click(
			function(){
			var len=$(":checkbox[name=multi_sel]:checked").length;
			if(len==1){
				$("#queryForm").attr("action","${rootPath}/model/delModel.ct");
				return true;
			}else{
				alert('请选择一个需要重置的用户！');
				return false;
			}
			});
			
	});
	
	function addpanel(id,title,html){
	      window.parent.parent.document.getElementById("framemain").contentWindow.addtabs(id,title,html);
	}

	
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryForm" action="/model/queryModel.ct" method="post"
			theme="simple">
			
					
		<table class="tb">
		    <tbody>
		        <tr class="tb-line">
		            <td class="tb-td" colspan="2"><div class="tb-h2">POS收单运营管理平台</div></td>
		        </tr>
		
		        <tr class="tb-line">
		            <td class="tb-td" colspan="2"><div class="tb-h3">用户权限模板</div></td>
		        </tr>
		
		        <tr class="tb-line">
		        
		            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
		                <div class="tb-h4">用户权限模板名称：</div>
		            </td>
		            <td class="tb-td">
		            
		                <label class="tb-input-lengthen" style="width: 100%;height:36px;display: inline-table;"><s:textfield id="modelName"
							name="searchCondition.modelName" cssClass="fullWidth" /></label>
		            </td>
		        </tr>
				
		        <tr class="tb-line">
		            <td class="tb-td line-submit" align="right" colspan="2">
		                <label class="tb-input-submit">
		                    <s:submit  value="查 询" />
		                </label>
		                <label class="tb-input-submit">
		                    <s:reset value="取 消" />
		                </label><br/>
		                <label class="tb-input-submit">
		                   <s:submit id="btnAdd" value="新增用户权限模板" />
		                </label>
		                <s:if test="#request.searchRsList != null && #request.searchRsList.size>0">	
		                <label class="tb-input-submit">
		                    <s:submit id="btnModif" value="修改模板" />
		                </label>
		                <label class="tb-input-submit">
		                    <s:submit id="btnDel" value="删除" />
		                </label>
		                </s:if><s:else>
		                <label class="tb-input-submit">
		                    <s:submit  disabled="true" id="btnModif" value="修改模板" />
		                </label>
		                <label class="tb-input-submit">
		                    <s:submit  disabled="true" id="btnDel" value="删除" />
		                </label>
		                </s:else>
		            </td>
		        </tr>
		    </tbody>
		</table>
			
			
				
		<div class="big-tb">
		    <table class="tb" style="width: 100%;">
		        <thead>
		        <tr class="tb-line">
						<td  class="tb-td line-submit"align="right" colspan="4" ><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
		            <tr class="tb-line">
		                <th class="tb-th" colspan="12">操作员基本信息列表</th>
		            </tr>
		            <s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging" align="left" colspan="12"><page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/model/queryModel.ct?currentPage=" />

						</td>
					</tr>
					</s:if>
		            <tr class="tb-line bg-gray">
		                <th class="tb-th">选择</th>
		                <th class="tb-th">模板名称</th>
		                <th class="tb-th">备注</th>
		                <th class="tb-th">创建日期</th>
		            </tr>
		        </thead>
		        <tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="model">
							<tr class="tb-line" >
							<td class="tb-td" align="center">
								<s:if test="#session.session_merchant.id==#oper.id||#oper.status=='02'">
								  <s:checkboxlist disabled="true" name="multi_sel" list="#{#model.id:''}"  theme="simple" /> </s:if>
								<s:else><s:checkboxlist  name="multi_sel" list="#{#model.id:''}"  theme="simple" /></s:else></td>
							<td class="tb-td">  <s:property value="#model.modelName"/></td>
							<td class="tb-td">  <s:property value="#model.remark"/></td>
							<td class="tb-td">  <s:property value="#model.dtCreate"/></td>
							</tr>
						</s:iterator>
		        </tbody>
		    </table>
		</div>
		
		</s:form>
	</div>
	<s:if test="#request.info_request !=null">
	<script language="javascript">
	    alert("${request.info_request}");
	    </script>
	</s:if>	
</body>
</html>
